package com.inetools.gwetons.client.logging;

import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.JsArrayMixed;
import com.google.gwt.core.client.JsArrayString;
import com.inetools.gwetons.shared.logging.LogUtil;

public interface JsniLogUtil {
	LogUtil getLogUtil();
	void setLogUtil( LogUtil logUtil);

	JavaScriptObject getLogFunction();
	
	void entering( String sourceMethod, JsArrayMixed params);
	JavaScriptObject getEnteringFunction();
	
	JavaScriptObject getExitingFunction();	
	JavaScriptObject getExitingWithResultFunction();
	
	/**
	 * This will be deprecated once the underneath Logger.entering method starts working as expected; 
	 * currently the Logger.entering method shows the unexpected result missing class name, method 
	 * name and parameter.
	 * @param jsArrayString: Elements of this are expected in the following order:
	 * <ul>
	 * <li>String: name of method</li>
	 * <li>String: additional message such as method arguments</li>
	 * <li>String representation of boolean to specify whether ignore the previous String element of  
	 * the additional message</li>
	 * <li>String representation of Logger.Level</li>
	 * </ul>
	 */
	@Deprecated
	void logEntering( JsArrayString jsArrayString);
	/**
	 * This will be deprecated once Logger.exiting method starts working as expected; currently 
	 * Logger.exiting method shows the unexpected result missing class name, method name and return.
	 * @param jsArrayString: Elements of this are expected in the following order:
	 * <ul>
	 * <li>String: name of method</li>
	 * <li>String representation of returned object</li>
	 * <li>String representation of boolean to specify whether ignore the previous String element for 
	 * the returned object for the returning void case</li>
	 * <li>String representation of Logger.Level</li>
	 * </ul>
	 */
	@Deprecated
	void logExiting( JsArrayString jsArrayString);
}
